﻿/**
@file SpriteWindows.h
@author onlytest
@brief SpriteWindows
*/

#ifndef SPRITEWINDOWS_H
#define SPRITEWINDOWS_H
#include "SpritePerDefine.h"
#include "SpriteEvent.h"
namespace Sprite
{	
	/**
	@brief 引擎程序窗口类的定义
	*/
	class SpriteWindows
	{
	public:	
		/**
		@brief SpriteWindows的构造函数
		@param hInstance	程序句柄
		*/
		SpriteWindows(HINSTANCE hInstance);

		/**
		@brief SpriteWindows的构造函数
		@param  hInstance	程序句柄
		@param  width	屏幕宽度
		@param  height	屏幕高度
		@param  title	程序标题
		*/
		SpriteWindows(HINSTANCE hInstance,int width,int height,std::wstring title);
		virtual ~SpriteWindows(void);

		/**
		@brief initWindow	初始化窗口 
		@return   HRESULT	返回是否成功
		*/
		virtual HRESULT initWindow();

		/**
		@brief getHWND	得到窗口句柄
		@return   HWND	返回窗口句柄
		*/
		virtual HWND getHWND();
		int getWidth() const { return m_nWidth; }
		void setWidth(int val) { m_nWidth = val; }
		int getHeight() const { return m_nHeight; }
		void setHeight(int val) { m_nHeight = val; }
		bool isFull() const { return m_bFull; }
		void setFull(bool val) { m_bFull = val; }
		bool isMix() const { return m_bMix; }
		void setMix(bool val) { m_bMix = val; }
		bool isMax() const { return m_bMax; }
		void setMax(bool val) { m_bMax = val; }
		bool isResizing() const { return m_bResizing; }
		void setResizing(bool val) { m_bResizing = val; }
	protected:
		///屏幕宽度
		int m_nWidth;
		///屏幕高度
		int m_nHeight;
		///窗口标题
		std::wstring m_strTitle;
		///程序实例
		HINSTANCE m_HInstance;		
		///主窗口句柄
		HWND m_HMainWnd ;
		///窗口最小化
		bool m_bMix;
		///窗口最大化
		bool	 m_bMax;
		///是否全屏
		bool m_bFull;
		///重新调整大小
		bool m_bResizing;
		
	};
}
#endif